﻿namespace TSU.FAMC.ComputerEngineering.Classes.Circuits.Basis
{
    /// <summary>
    /// Registers every new circuit element by assigning to it unique identificator.
    /// </summary>
    public class CircuitElementRegister
    {
        // Properties

        /// <summary>
        /// Counter for elements identificators.
        /// </summary>
        private static int _idCounter;


        // Methods

        /// <summary>
        /// Returns next identificator.
        /// </summary>
        /// <returns></returns>
        public static int GenerateId()
        {
            return ++_idCounter;
        }
    }
}
